﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.SqlClient;
using System.Data;
using Common.DbConstants;

namespace Common.DbConstants
{
    public class DbUtility
    {
        public static SqlParameter GetErrorMessageParameter()
        {
            SqlParameter outErrorMessageParam = new SqlParameter(DbParameters.ERRORMESSAGE, SqlDbType.VarChar);
            outErrorMessageParam.Size = 4000;
            outErrorMessageParam.Direction = ParameterDirection.Output;
            return outErrorMessageParam;
        }

        public static SqlParameter GetSuccessMessageParameter()
        {
            SqlParameter outSuccessMessageParam = new SqlParameter(DbParameters.SUCCESSMESSAGE, SqlDbType.VarChar);
            outSuccessMessageParam.Size = 4000;
            outSuccessMessageParam.Direction = ParameterDirection.Output;
            return outSuccessMessageParam;
        }

        public static SqlParameter GetIdentityParameter()
        {
            SqlParameter outIdentityParam = new SqlParameter(DbParameters.IDENTITY, SqlDbType.Int);
            outIdentityParam.Size = 16;
            outIdentityParam.Direction = ParameterDirection.Output;
            return outIdentityParam;
        }
    }
}
